ABC083 B - Some Sums
https://atcoder.jp/contests/abc083/tasks/abc083_b
提出
code: python
n, a, b = list(map(int, input().split()))
ans = 0
for i in range(1, n+1):
digitSum = sum(list(map(int, str(i))))
if (digitSum >= a and digitSum <= b):
ans += i
print(ans)
メモ
digitSum = sum(list(map(int, str(i))))